var should = require('should');
var onlineHandler = require('../../../app/servers/activity/handler/onlineHandler');
var config = require('../../config');
var configUtil = require('../../../app/util/configUtil');
var analyze = require('kc-analyze');

suite('测试onlineHandler', function () {
    setup(function (done) {
        var analyze_config = configUtil.load('analyze');
        var game_config = configUtil.load('game');
        analyze.initialize({
            host: analyze_config.host,
            server_id: game_config.server_id
        });
        done();
    });

    suite('reward', function () {
        test('在线领取奖励', function (done) {
            var msg = {};
            var session = {};
            session.uid = config.other_role_id;

            var online_handler = new onlineHandler();
            online_handler.reward(msg, session, function (err, res) {
                done();
            });
        });
    });
});
